﻿namespace TaxiService.Model
{
  public class Location : IValueObject
  {
    public Location(int regionId)
    {
      RegionId = regionId;
    }

    public override bool Equals(object obj)
    {
      var location = obj as Location;
      if (location == null)
        return false;

      return location.RegionId == RegionId;
    }

    public override int GetHashCode()
    {
        return RegionId.GetHashCode();
    }

    public int RegionId { get; private set; }
  }
}